<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>JS006-九九乘法表案例</title>
</head>
<style>
  table {
    border-collapse: collapse;
  }

  td {
    width: 90px;
    height: 30px;
    border: 1px solid gray;
    /* padding: 5px 10px; */
    text-align: center;
  }
</style>

<body>
  <script>
    document.writeln(`<table>`);
    for (let i = 1; i <= 9; i++) {
      document.writeln(`<tr>`);
      for (j = 1; j <= i; j++) {
        document.writeln(`<td>${i} * ${j} = ${i * j}</td>`);
      }
      document.write("</tr>");
    }
    document.writeln(`</table>`);
  </script>
</body>

</html>